package com.xbongbong.pro.enums.raiders.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import lombok.Getter;

/**
 * 步骤（或实操）的finish状态枚举
 * @author zcp
 * @version v1.0
 * @date 19/10/17 017 13:51
 * @update 19/10/17 017 13:51
 * @since v1.0
 */
@Getter
public enum RaidersFinishEnum {
    /**
     * 完成情况枚举，对应数据库内finish字段
     */
    FINISH_UN(0, "enum.raidersFinish.name.finish_un", "enum.raidersFinish.memo.finish_un"),

    FINISH(1, "enum.raidersFinish.name.finish", "enum.raidersFinish.memo.finish"),

    FINISH_PART(2, "enum.raidersFinish.name.finish_part", "enum.raidersFinish.memo.finish_part"),

    UNKNOWN(404, "", ""),

    ;

    /**
     * 枚举值 --
     */
    private final int code;
    /**
     * 枚举信息--中文名称
     */
    private final String name;
    /**
     * 枚举信息--中文名称
     */
    private final String memo;

    RaidersFinishEnum(int code, String name, String memo) {
        this.code = code;
        this.name = name;
        this.memo = memo;
    }

    public String getMemo() {
        return I18nMessageUtil.getMessage(memo);
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }
}
